<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <h2>{{message}}</h2>
  <ul>
    <!--(item,index) 分别是值和下标，下标可省略-->
    <li v-for="(item,index) in colors">{{index+1}}.{{item}}</li>
  </ul>

  <ul>
    <!--(value,key,index)值、键和下标，key、index可省略-->
    <li v-for="(value,key,index) in info">{{index+1}}. {{key}}: {{value}}</li>
  </ul>
</div>

<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      message: 'hi',
      //数组
      colors:['red','yellow','green','blue','black'],
      //对象
      info:{
        name: 'Tom',
        age: 21,
        height: 1.79
      }
    },
    computed: {

    },
    methods: {

    }
  })

</script>
</body>
</html>